@import "@Scss/main_variables.scss";
* {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

// 定义方向映射
$directions: (top, right, bottom, left);

// 定义混合
@mixin generate-margin-padding($property, $prefix) {
  @each $direction in $directions {
    .#{$prefix}_#{$direction} {
      #{$property}-#{$direction}: $MarginPadding;
    }
  }
}

// 生成 margin 类
@include generate-margin-padding("margin", "margin");

// 生成 padding 类
@include generate-margin-padding("padding", "padding");
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  background: #f5f5f5;
}
.el-card {
  border-radius: 8px;
}
.flex_l{
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.flex_r{
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.pagination_box{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 4vh;
}

.el-date-editor.el-input, .el-date-editor.el-input__inner,
.from_input_number{
  width:100%;
}
#HomeIndex .homen_ecarts_show,
#HomenTabTableShow {
  .el-card__body {
    height: 55.5vh;
    overflow: auto;
  }
}
#HomeIndex {
  min-height: calc(100vh - 64px - 5vh - 3 * #{$MarginPadding});
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  .home_top_box {
    flex-shrink: 0; /* 防止被压缩 */
  }
  .home_footer_box {
    flex-grow: 1; /* 占用剩余空间 */
  }
  .box-card {
    height: 100%;
  }
}

#Login {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  h1 {
    font-size: 2rem;
    margin-bottom: $MarginPadding * 2;
  }
  .el-card {
    padding: 24px;
    border-radius: 0 0 8px 8px;
    .el-card__body {
      padding: 0;
    }
  }
}

#LayoutIndex {
  .container_box {
    height: 100vh;
  }
  .main_container{
    display: block;
  }
  .tag_card_box {
    height: 5vh;
    margin: 0 0 $MarginPadding 0;
    display: flex;
    align-items: center;
    justify-content: start;
  }
  .tag_crumbs_item {
    margin-right: $MarginPadding;
    span {
      cursor: pointer;
    }
  }
  .router_view_card_box {
    height: calc(100vh - 64px - 5vh - 3 * #{$MarginPadding});
  }
  .main_box {
    padding: $MarginPadding;
  }
}
#AsideComponents{
  .aside_box {
    background: #001529;
    height: 100%;
    h1 {
      color: white;
      font-size: 1.2rem;
      font-weight: bold;
      height: 64px;
      line-height: 64px;
    }
    .el-menu {
      border: none;
    }
  }
  .el-menu {
    text-align: left;
    .el-menu-item {
      min-width: 184px !important;
      margin: 0 8px;
      height: 40px;
      line-height: 40px;
    }
    .is-active {
      background-color: #1677ff !important;
      border-radius: 8px;
    }
  }
  .el-menu--inline {
    .el-menu-item {
      padding-left: 50px !important;
    }
  }
  .el-submenu__title {
    height: 40px;
    line-height: 40px;
    padding-left: 28px !important;
    background-color: none !important;
  }
  .el-menu--collapse {
    .el-menu-item {
      min-width: 60px !important;
    }
  }
}

#HeaderComponents{
  .header_box {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    .header_l {
      font-size: 1.5rem;
      span {
        cursor: pointer;
        &:hover {
          color: #409eff;
        }
      }
    }
    .header_r {
      display: flex;
      align-items: center;
      justify-content: center;
      .el-dropdown-link {
        cursor: pointer;
        span {
          margin: 0 0 0 $MarginPadding;
        }
      }
    }
  }
}
#HomeUserShow {
  .user_info_header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    .user_info_header_r {
      width: 100%;
      text-align: left;
      padding: 0 0 0 $MarginPadding;
      h1 {
        font-size: 2.5rem;
        font-weight: bold;
      }
      span {
        font-size: 1.5rem;
        font-weight: 400;
      }
    }
  }
  .user_info_footer {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    line-height: 2;
    color: #999;
    text-align: left;
    span {
      font-weight: bold;
      text-align: left;
    }
  }
}

#HomeTopStatistics {
  .count_box_card {
    .el-card__body {
      display: flex;
      align-items: center;
      width: 100%;
      .count_l {
        font-size: 3rem;
        width: 40%;
      }
      .count_r {
        font-size: 1.5rem;
        font-weight: bold;
        text-align: left;
        line-height: 1.7;
        width: 60%;
        div {
          display: flex;
        }
      }
    }
  }
  .count-box-card-bottom {
    margin-bottom: $MarginPadding;
  }
}

#ComponentsPagination{
  .el-pagination{
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .el-pagination--small button, .el-pagination--small span:not([class*=suffix]){
    height: 26px;
    line-height: 26px;
  }
}

#CustomModal{
  .el-dialog__header{
    display: flex;
  }
  .el-dialog__body{
    padding: $MarginPadding;
  }
}